﻿using System;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Xml.Linq;
using System.Xml.Serialization;

namespace BEO
{
    [DataContract]
    public class Errand
    {
        [DataMember]
        public Guid Id { get; set; }
        [DataMember]
        public string Title { get; set; }
        [DataMember]
        public string Description { get; set; }
        [DataMember]
        public string Address { get; set; }
        [DataMember]
        public double Latitude { get; set; }
        [DataMember]
        public double Longitude { get; set; }
        [DataMember]
        public int Time { get; set; }

        public Errand()
        {
            Id = Guid.NewGuid();
        }

        public override string ToString()
        {
            return string.Format("Errand Summary\nName: {0}\nDescription: {1}\nAddress: {2}\nEstimated Time: {3} minutes",
                                    Title,
                                    Description,
                                    Address,
                                    Time
                                );
        }
    }
}